/**
 * Copyright (c) Enalean, 2016. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

@import 'fonts';

$tlp-typo-default-text-color: #333333;
$tlp-font-family: 'SourceSansPro', Helvetica, Arial, sans-serif;

body {
    color: $tlp-typo-default-text-color;
    font-family: $tlp-font-family;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 $tlp-spacing;
    text-rendering: optimizelegibility;

    small {
        margin: 0 0 0 5px;
        color: $tlp-ui-dimmed;
    }
}

h1 {
    margin: 0 0 $tlp-title-spacing;
    font-size: 46px;
    font-weight: 400;

    small {
        font-size: 28px;
    }
}

h2 {
    font-size: 30px;
    font-weight: 400;

    small {
        font-size: 20px;
    }
}

h3 {
    color: $tlp-ui-dimmed;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;

    small {
        font-size: 14px;
        text-transform: none;
    }
}

h4 {
    font-size: 20px;
    font-weight: 600;

    small {
        font-size: 13px;
    }
}

h5 {
    font-size: 18px;
    font-weight: 600;

    small {
        font-size: 13px;
    }
}

h6 {
    font-size: 17px;
    font-weight: 600;

    small {
        font-size: 13px;
    }
}

p {
    margin: 0 0 $tlp-spacing;
    font-size: 16px;
    line-height: 24px;

    &:last-child,
    &[class^="text-"] {
        margin: 0;
    }
}

ul,
ol {
    margin: 0 0 $tlp-spacing;
    padding: 0 0 0 1.5 * $tlp-spacing;
    line-height: 24px;

    &:last-child {
        margin: 0;
    }
}

a {
    color: $tlp-theme-color;
}

strong {
    font-weight: 700;
}

blockquote {
    margin: 0 0 $tlp-spacing;
    padding: 0 0 0 $tlp-spacing / 2;
    border-left: 5px solid #d7d7d7;
    font-size: 16px;
    line-height: 24px;
}

%tlp-text {
    line-height: 16px;
}

.tlp-text-muted {
    @extend %tlp-text;
    color: $tlp-ui-dimmed;
}

.tlp-text-info {
    @extend %tlp-text;
    color: $tlp-ui-info;
}

.tlp-text-success {
    @extend %tlp-text;
    color: $tlp-ui-success;
}

.tlp-text-warning {
    @extend %tlp-text;
    color: $tlp-ui-warning;
}

.tlp-text-danger {
    @extend %tlp-text;
    color: $tlp-ui-danger;
}

%tlp-code {
    background: transparentize($tlp-theme-color, .95);
    color: $tlp-theme-color;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

code {
    @extend %tlp-code;

    padding: 3px;
    border-radius: 3px;
}

pre {
    @extend %tlp-code;

    padding: 5px 3px 5px $tlp-spacing / 2;
    border-left: 5px solid transparentize($tlp-theme-color, .5);

    code {
        padding: 0;
        background: none;
    }
}
